<div style="max-width: 500px;">

    <table class="vis simple_border" style="width: 100%;">
        <tr>
            <th width="140">Betreff</th>
            <th width="400">
                <img src="$report.color.iconPath()" title="" alt="" class=""> 
                <span id="label">
                    <span id="labelText">$report.title</span>
                </span>
            </th>

        </tr>
        <tr>
            <td>Gesendet</td>
            <td>$report.sendTime</td>
        </tr>
        <tr>
            <td colspan="2" style="border: 1px solid black; padding: 4px;" height="160" valign="top">
                <h3 style="margin-top: 0px; text-decoration: none;">#if ($report.won)Der Angreifer hat gewonnen#elseif(!$report.won)Der Verteidiger hat gewonnen#end</h3>
                <h4>Gl&uuml;ck (aus Sicht des Angreifers)</h4>
                <table>
                    <tbody>
                        <tr>
                            #if ($report.luck <= 0)<td class="nobg" style="padding: 0pt;"><b>$report.luck%</b></td>#end
                            <td class="nobg"><img src="#if ($report.luck <= 0)http://dsgfx.bmaker.net/rabe.png#elseif($report.luck > 0)http://dsgfx.bmaker.net/rabe_grau.png#end" alt="Pech" /></td>

                            <td class="nobg">
                                <table class="luck" cellpadding="0" cellspacing="0">
                                    <tbody>
                                        <tr>
                                            <!--#if ($report.luck != 0)
                                            #set( $width = 25 + $report.luck * 2)
                                            <td width="#if ($report.luck <= 0)$width#end"height="12"></td>
                                            #end
                                            
                                            <td width="{if $report.luck <= 0}{math equation="-luck * 2" luck=$report.luck_i}{else}0{/if}" style="background-image:url(http://dsgfx.bmaker.net/balken_pech.png);"></td>
                                            <td width="2" style="background-color:rgb(0, 0, 0)"></td>
                                            <td width="{if $report.luck > 0}{math equation="(luck) * 2" luck = $report.luck_i}{else}0{/if}" style="background-image:url(http://dsgfx.bmaker.net/balken_glueck.png);"></td>
                                            <td width="{if $report.luck > 0}{math equation="(25 - luck) * 2" luck = $report.luck_i}{else}48{/if}" height="12"></td>
                                            {else}
                                            <td width="48" height="12"></td>
                                            <td width="0" style="background-image:url(http://dsgfx.bmaker.net/balken_pech.png);"></td>
                                            <td width="2" style="background-color:rgb(0, 0, 0)"></td>
                                            <td width="0" style="background-image:url(http://dsgfx.bmaker.net/balken_glueck.png);"></td>
                                            <td width="48" height="12"></td>
                                            {/if}
                                            -->
                                            <!--
                                            <td class="luck-item nobg" height="12" width="45.76110442"></td>http://die-staemme.de/graphic/klee_grau.png?1
                                            <td class="luck-item nobg" style="background-image: url(&quot;graphic/balken_pech.png?1&quot;); border-right: 1px solid rgb(0, 0, 0);" width="4.23889558"></td>
                                            <td class="luck-item nobg" style="background-image: url(&quot;graphic/balken_glueck.png?1&quot;);" width="0"></td>
                                            <td class="luck-item nobg" width="50"></td>
                                            -->
                                        </tr>
                                    </tbody>
                                </table>
                            </td>
                            <td class="nobg">
                                <img src="#if ($report.luck > 0)http://dsgfx.bmaker.net/klee.png#elseif($report.luck <= 0)http://dsgfx.bmaker.net/klee_grau.png#end" alt="Gl$uuml;ck" />
                            </td>

                        </tr>
                    </tbody>
                </table>

                <h4 style="margin-top: 0px;">Moral: $report.moral%</h4>
                <table id="attack_info_att" style="border: 1px solid rgb(222, 211, 185);" width="100%">
                    <tbody>
                        <tr>
                            <th style="width: 20%;">Angreifer:</th>
                            <th><span class="ds_link">$report.attacker</span></th>
                        </tr>
                        <tr>
                            <td>Herkunft:</td>
                            <td><span class="ds_link">$report.source</span></td>
                        </tr>
                        <tr>
                            <td colspan="2" style="padding: 0px;">
                                <table id="attack_info_att_units" class="vis" style="border-collapse: collapse;">
                                    <tbody>
                                        <tr class="center">
                                            <td></td>
                                            #foreach($unit in $report.attackers)
                                            #set( $unitImage = "http://dsgfx.bmaker.net/unit_" + $unit.unit.plainName + ".png" )
                                            <td width="35"><img src="$unitImage" title="$unit.getUnit().getPlainName()" alt="" /></td>
                                            #end
                                        </tr>
                                        <tr>
                                            <td width="20%">Anzahl:</td>
                                            #foreach($unit in $report.attackers)
                                            <td style="text-align: center;"#if($unitamount == 0)class="hidden"#end>$unit.amount</td>
                                            #end
                                        </tr>
                                        <tr>
                                            <td align="left" width="20%">Verluste:</td>
                                            #foreach($unit in $report.lostAttackers)
                                            <td style="text-align: center;"#if($unit.amount == 0)class="hidden"#end>$unit.amount</td>
                                            #end
                                        </tr>
                                    </tbody>
                                </table>
                            </td>
                        </tr>

                    </tbody>
                </table>
                <br>
                <table id="attack_info_def" style="border: 1px solid rgb(222, 211, 185);" width="100%">
                    <tbody>
                        <tr>
                            <th style="width: 20%;">Verteidiger:</th>
                            <th><span class="ds_link">$report.defender</span></th>
                        </tr>
                        #if($report.lostEverything)
                        <tr>
                            <td>Ziel:</td>
                            <td><span class="ds_link">$report.target</span></td>
                        </tr>
                        <tr>
                            <td colspan="2"><p>Keiner deiner K&auml;mpfer ist lebend zur&uuml;ckgekehrt. Es konnten keine Informationen $uuml;ber die Truppenst&auml;ke des Gegners erlangt werden.</p></td>
                        </tr>
                    </tbody>
                </table>
                #else
        <tr>
            <td>Ziel:</td>
            <td><span class="ds_link">$report.target</span></td>
        </tr>
        <tr>
            <td colspan="2" style="padding: 0px;">
                <table id="attack_info_def_units" class="vis" style="border-collapse: collapse;">
                    <tbody>
                        <tr class="center">
                            <td></td>
                            #foreach($unit in $report.defenders)
                            #set( $unitImage = "http://dsgfx.bmaker.net/unit_" + $unit.unit.plainName + ".png" )
                            <td width="35"><img src="$unitImage" title="$unit.unit.plainName" alt="" /></td>
                            #end
                        </tr>
                        <tr>
                            <td width="20%">Anzahl:</td>
                            #foreach($unit in $report.defenders)
                            <td style="text-align: center;"#if($unit.amount == 0)class="hidden"#end>$unit.amount</td>
                            #end
                        </tr> 
                        <tr>
                            <td align="left" width="20%">Verluste:</td>
                            #foreach($unit in $report.lostDefenders)
                            <td style="text-align: center;"#if($unit.amount == 0)class="hidden"#end>$unit.amount</td>
                            #end
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
        #end
        </tbody>
    </table>
    <br>



    #if($report.wasSpied())
    <h4>Spionage</h4>
    <table style="border: 1px solid #DED3B9">
        <tr>
            <th>Ersp&auml;hte Rohstoffe:</th>
            <td>
                #if ($report.hasSpiedResources())
                <img src="http://dsgfx.bmaker.net/holz.png" title="Holz" alt="" />$report.spiedWood
                <img src="http://dsgfx.bmaker.net/lehm.png" title="Lehm" alt="" />$report.spiedClay
                <img src="http://dsgfx.bmaker.net/eisen.png" title="Eisen" alt="" />$report.spiedIron
                #else
                <i>keine Informationen</i>
                #end
            </td>
        </tr>
        #if(!$report.buildings.isEmpty())
        <tr>
            <th>Ge&auml;ude:</th>
            <td>
                #foreach($building in $report.buildings)
                $building.building.name <b>(Stufe $building.levelBefore)</b><br />
                #end
            </td>
        </tr>
        #end
    </table>

    #if (!$report.troopsOutside.isEmpty())
    <table>
        <tr>
            <th>Einheiten ausserhalb:</th>
        </tr>
        <tr>
            <td>
                <table>
                    <tr>
                        #foreach($unit in $report.troopsOutside)
                        #set( $unitImage = "http://dsgfx.bmaker.net/unit_" + $unit.unit.plainName + ".png" )
                        <td width="35"><img src="$unitImage" title="$unit.unit.plainName" alt="" /></td>
                        #end
                    </tr>
                    <tr>
                        #foreach($unit in $report.troopsOutside)
                        <td style="text-align: center;"#if($unit.amount == 0)class="hidden"#end>$unit.amount</td>
                        #end
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    #end

    <br />
    <br />
    #end

    #if (!$report.troopsOnTheWay.isEmpty())
    <h4>Truppen des Verteidigers, die unterwegs waren</h4>
    <table class="vis">
        <tbody>
            <tr>
                #foreach($unit in $report.troopsOnTheWay)
                #set( $unitImage = "http://dsgfx.bmaker.net/unit_" + $unit.unit.plainName + ".png" )
                <td width="35"><img src="$unitImage" title="$unit.unit.plainName" alt="" /></td>
                #end
            </tr>
            <tr>
                #foreach($unit in $report.troopsOnTheWay)
                <td style="text-align: center;"#if($unit.amount == 0)class="hidden"#end>$unit.amount</td>
                #end
            </tr>
        </tbody>
    </table>
    #end

    #if ($report.hasMiscInformation())
    <table width="100%" class="simple_border">
        #if ($report.hasHaulInformation())
        <tr>
            <th width="100">Beute:</th>
            <td width="220">
                <img src="http://dsgfx.bmaker.net/holz.png" alt="Holz" /> $report.woodHaul
                <img src="http://dsgfx.bmaker.net/lehm.png" alt="Lehm" /> $report.clayHaul
                <img src="http://dsgfx.bmaker.net/eisen.png" alt="Eisen" /> $report.ironHaul
            </td>
            <td>
                #set($haul=$report.woodHaul + $report.clayHaul + $report.ironHaul)
                $haul/$report.maxHaul
            </td>
        </tr>
        #end

        #if ($report.wallDamage)
        <tr>
            <th>Schaden durch Rammen:</th>
            <td>Wall besch&auml;digt von Level <b>$report.wallDamage.levelBefore</b> auf Level <b>$report.wallDamage.levelAfter</b></td>
        </tr>
        #end


        #if ($report.buildingDamage)
        <tr>
            <th>Schaden durch Katapultbeschuss:</th>
            <td>{$report.buildingDamage.building.name} besch&auml;digt von Level <b>$report.buildingDamage.levelBefore</b> auf Level <b>{$report.buildingDamage.levelAfter</b></td>
        </tr>
        #end

        #if ($report.acceptBefore != $report.acceptAfter)
        <tr>
            <th>Ver&auml;nderung der Zustimmung:</th>
            <td>Zustimmung gesenkt von <b>$report.acceptBefore</b> auf <b>$report.acceptAfter</b></td>
        </tr>
        #end
    </table>
    #end
    <br>
    <hr>

    </td>

    </tr>
    </tbody></table>
